package com.acmen.easyapi.web;


import com.acmen.easyapi.model.Response;
import com.acmen.easyapi.service.AuthorizationService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author acmen
 * 获取授权信息
 * @date 2022-03-16
 */
@RestController
public class AuthController {
    @Resource
    private AuthorizationService authorizationService;

    @GetMapping(value = "/api/authorize")
    public Response authInfos(HttpServletRequest request, HttpServletResponse response) {
        return authorizationService.authorize(request,response);
    }
}
